feat(manifest): add per-file digest provenance - #87
Draft
stacknil wants to merge 4 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #84.
input_file_digestsandconfig_file_digeststo every primary run manifest.input_digestandconfig_digestaggregate contract..gitattributesso exact-byte values reproduce across Windows and Linux clean clones.Design decision
The legacy aggregate digests remain label-sorted and LF/CRLF-normalized for UTF-8 text. Per-file digests use
read_bytes()directly and are keyed by canonical repository-relative paths. A bounded LF checkout contract makes those shipped bytes platform-stable; the per-file algorithm itself does not normalize line endings. The schema keeps the new maps optional so olderrun-manifest/v1consumers remain readable while current writers always emit them.Main risk
The LF checkout contract renormalizes four historical CRLF/mixed tracked input/config files at the Git blob boundary. Parsed content is unchanged, aggregate digest values remain unchanged, and the resulting per-file values are now reproducible across clean clones.
Compatibility impact
Additive manifest fields only. Existing aggregate digest values are asserted against the v1.2 contract, a legacy manifest without per-file maps remains schema-valid, and current writers emit exact-byte maps for all six primary manifests.
Rollback path
Revert the four commits in order, or stop consuming the optional per-file maps;
input_digestandconfig_digestremain unchanged. If the LF checkout contract must be reverted, regenerate manifests on the chosen repository byte contract before publishing.Validation
python -m pytest -q— 196 passed locally.python scripts/regenerate_artifacts.py --check— 29 strict artifacts matched; 6 visual snapshots smoke-generated.read_bytes()with sorted path checks passed.